package com.platform.sys.modular.syncdata.param;

import lombok.Data;
import com.platform.core.pojo.base.param.BaseParam;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
* 同步目标设置参数类
 *
 * @author gyp
 * @date 2022-12-05 11:00:08
*/
@Data
public class SyncDataTargetParam extends BaseParam {

    /**
     *
     */
    @NotNull(message = "不能为空，请检查id参数", groups = {edit.class, delete.class, detail.class})
    private Long id;

    /**
     * 同步源数据id
     */
    @NotNull(message = "不能为空，请检查syncSourceId参数", groups = {list.class, add.class, edit.class})
    private Long syncSourceId;

    /**
     * 数据源id
     */
    @NotNull(message = "数据源id不能为空，请检查datasourceId参数", groups = {list.class, add.class, edit.class})
    private Long datasourceId;

    /**
     * 数据库表名称
     */
    @NotBlank(message = "数据库表名称不能为空，请检查tableName参数", groups = {add.class, edit.class})
    private String tableName;

    /**
     * 数据库被更新字段名称
     */
    @NotBlank(message = "数据库被更新字段名称不能为空，请检查fieldName参数", groups = {add.class, edit.class})
    private String fieldName;

    /**
     * 1、更新；2、递增；3、递减
     */
    @NotNull(message = "1、更新；2、递增；3、递减不能为空，请检查strategy参数", groups = {add.class, edit.class})
    private Integer strategy;

    /**
     * 用于查询的字段
     */
    @NotBlank(message = "用于查询的字段不能为空，请检查queryField参数", groups = {add.class, edit.class})
    private String queryField;

}
